Fix ZEND_FASTCALL definition wrt. x64 Windows clang builds #15425
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As is, MSVC uses
__vectorcall
, but clang uses__cdecl
. This obviously is bad for interoperability (and causes link issues), and is likely worse for FFI which offers some limited (but likely sufficient for our purposes) support for__vectorcall
on Windows.Since clang claims to support
__vectorcall
as of 3.6.0, and we bumped the requirements to clang 4.0.0 already, there shouldn't be any issues.I've did a minimal x64 clang 4.0.0 build on Windows (
configure --disable-all --enable-cli --with-toolset=clang
) and didn't notice any issues (tests/ where running fine, and the function names where mangled appropriately).For some more details see also #15415 (comment).